package com.bwie.service.impl;

import com.bwie.dao.OrderDao;
import com.bwie.pojo.GoodsOrder;
import com.bwie.pojo.Order;
import com.bwie.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderServiceImpl implements OrderService {

    @Autowired
    private OrderDao orderDao;

    @Override
    public Integer addOrder(Order order) {
        return orderDao.addOrder(order);
    }

    @Override
    public int updateOrder(Order order) {
        return orderDao.updateOrder(order);
    }

    @Override
    public Order getOrder(Integer userId) {
        return orderDao.getOrder(userId);
    }

    @Override
    public GoodsOrder getGoodsOrder(Integer userId) {
        return orderDao.getGoodsOrder(userId);
    }

    @Override
    public Order getOrder2(Integer orderId) {
        return orderDao.getOrder2(orderId);
    }

    @Override
    public GoodsOrder echo2(Integer orderId) {
        return orderDao.echo2(orderId);
    }

    @Override
    public Order findOrder(Integer orderId, Integer userId) {
        return orderDao.findOrder(orderId,userId);
    }

    @Override
    public void updateStatus(Order order) {
        orderDao.updateStatus(order);
    }
}
